package com.heima.wemedia.thread;

import com.heima.model.wemedia.pojos.WmUser;

public class UserThreadLocal {

    //ThreadLocal类型的静态变量
    public static ThreadLocal<WmUser> threadLocal = new ThreadLocal<>();

    //对应的getter和setter方法
    public static WmUser get(){
        return threadLocal.get();
    }
    public static void set(WmUser wmUser){
        threadLocal.set(wmUser);
    }
    //变量对应的remove
    public static void remove(){
        threadLocal.remove();
    }
}
